<?php /* Smarty version Smarty-3.0.6, created on 2012-12-11 09:13:50
         compiled from "/var/www/myweb/admin/skis/templates/include/editsonmenu.html" */ ?>
<?php /*%%SmartyHeaderCode:21973960150c6f94e832e83-49753889%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '545f87675814a4a4349acdb1cb04a087ff350327' => 
    array (
      0 => '/var/www/myweb/admin/skis/templates/include/editsonmenu.html',
      1 => 1355217226,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '21973960150c6f94e832e83-49753889',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php $_template = new Smarty_Internal_Template("include/header1.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>

<!-- topbar starts -->
<?php $_template = new Smarty_Internal_Template("include/header2.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
<!-- topbar ends -->
        <div class="container-fluid">
        <div class="row-fluid">
<!-- left menu starts -->
<?php $_template = new Smarty_Internal_Template("include/leftmenu.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
<!-- left menu ends -->
    <div id="content" class="span10">
			<!-- content starts -->
			<div>
				<ul class="breadcrumb">
					<li>
						<a href="#">首页</a> <span class="divider">/</span>
					</li>
					<li>
						<a href="#">菜单</a>
					</li>
				</ul>
			</div>
    <div class="row-fluid sortable">	
				<div class="box span12">
					<div class="box-header well" data-original-title>
						<h2><i class="icon-plus"></i>菜单编辑</h2>
						<div class="box-icon">
							<a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a>
							<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
							<a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
						</div>
					</div>
					<!--内容-->
                                        
                                        <div class="box-content">
                                            
                            <!-- #################################################### -->
                            <div class="row-fluid sortable ui-sortable">
				<!--span -->
                                <script type="text/javascript">
                                    function enabledselect(){
                                        $("select[name=myselect1]").removeAttr("disabled");
                                    }

                                    function disabledselect(){
                                        $("select[name=myselect1]").attr("disabled","disabled");
                                    }
                                </script>
                                <div class="box span6">
                                        <div class="box-header well">
                                                <h2><i class="icon-eye-open"></i> 编辑子菜单</h2>
                                                <div class="box-icon">
                                                        <a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a>
                                                        <a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
                                                        <a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
                                                </div>
                                        </div>
                                        <div class="box-content">
                                            <form method="post" action="<?php echo $_smarty_tpl->getVariable('webpaths')->value;?>
?c=menuedit&a=editmenu">
                                                <input name="editsonmenuid" type="hidden" value="<?php echo $_smarty_tpl->getVariable('editsonmenuid')->value;?>
" />
                                            <p>名称:</p>
                                            <p><input type="text" name="menuname" value="<?php echo $_smarty_tpl->getVariable('editsonmenuname')->value;?>
" /></p>
                                            <p>类型:</p>
                                            <?php if ($_smarty_tpl->getVariable('editsonmenutype')->value=="channel"){?>
                                            <p><label class="radio"><input type="radio" name="type" value="channel" checked="checked" onclick="disabledselect()" /> 文章分类目录</label></p>
                                            <p><label class="radio"><input type="radio" name="type" value="content" onclick="enabledselect()" /> 单页面</label><select name="myselect1"  disabled="disabled"><?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['i']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['name'] = 'i';
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'] = is_array($_loop=$_smarty_tpl->getVariable('contentdata')->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total']);
?><option value="<?php echo $_smarty_tpl->getVariable('contentdata')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]['id'];?>
"><?php echo $_smarty_tpl->getVariable('contentdata')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]['title'];?>
</option><?php endfor; endif; ?></select></p>
                                            <?php }elseif($_smarty_tpl->getVariable('editsonmenutype')->value=="content"){?>
                                            <p><label class="radio"><input type="radio" name="type" value="channel" onclick="disabledselect()" /> 文章分类目录</label></p>
                                            <p><label class="radio"><input type="radio" name="type" value="content"  checked="checked" onclick="enabledselect()" /> 单页面</label>&nbsp;<select name="myselect1" ><option value="<?php echo $_smarty_tpl->getVariable('editsonmenu_singlepageid')->value;?>
"><?php echo $_smarty_tpl->getVariable('editsonmenu_singlepagetitle')->value;?>
</option><?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['i']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['name'] = 'i';
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'] = is_array($_loop=$_smarty_tpl->getVariable('contentdata')->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total']);
?><option value="<?php echo $_smarty_tpl->getVariable('contentdata')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]['id'];?>
"><?php echo $_smarty_tpl->getVariable('contentdata')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]['title'];?>
</option><?php endfor; endif; ?></select></p>
                                            <?php }?>
                                            
                                            <p><input type="submit" class="btn btn-info" name="click" value="保存" /></p>
                                            </form>
                                        </div>
                                </div><!--/span-->	
			</div>
                            <!-- #################################################### -->
					</div>
                                        <!--内容-->
				</div><!--/span-->
				
			</div><!--/row-->
                        
    </div>

    </div>
    <hr />
    
    <script type="text/javascript">
        $("#myul1").dragsort({
                dragSelector: "div", 
                dragBetween: true, 
                dragEnd: saveOrder, 
                placeHolderTemplate: "<li class='placeHolder'><div></div></li>",
                scrollSpeed: 3
        });

        function saveOrder() {
                var data = $("#myul1 li").map(function(){
                        return $(this).children().html();
                }).get();
                $("input[name=list1SortOrder]").val(data.join("|"));
        };
    </script>
    
<?php $_template = new Smarty_Internal_Template("include/footer2.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
</div>
<?php $_template = new Smarty_Internal_Template("include/footer1.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>